/*
 *
 * Copyright (C) 2012 Walter Lütgenau
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package offset.nodes.client.veditor.controller;

import java.awt.CardLayout;
import java.awt.event.ActionEvent;
import offset.nodes.client.editor.Editor;
import offset.nodes.client.editor.controller.ViewActions;
import offset.nodes.client.editor.view.PopupTree;
import offset.nodes.client.veditor.VirtualEditor;

/**
 *
 * @author
 * Walter
 * Lütgenau
 */
public class VirtualViewActions extends ViewActions {
    public static class VirtualStructureViewAction extends StructureViewAction {

        PopupTree.NodePopup[] nodePopups;

        public VirtualStructureViewAction(Editor editor) {
            super(editor);
        }

        public void action(ActionEvent e) {
            getEditor().getStructureScroll().setViewportView(getEditor().getStructureTree());
            ((CardLayout) getEditor().getTreePanel().getLayout()).show(getEditor().getTreePanel(), "structure");

            getEditor().getStructure().addNodePopups(DataActions.getDataPopups((VirtualEditor) getEditor()));
        }
    }

    
}
